package com.jy.novel.utils;

import org.apache.commons.codec.digest.DigestUtils;

/**
 * Created by jihb on 5/5/16.
 */
public class EncryptUtils {

    /**
     * md5加密
     * @param origStr
     * @return
     */
    public static String encryptMd5(String origStr){
        return DigestUtils.md5Hex(origStr);
    }

    /**
     * sha1加密
     * @param origStr
     * @return
     */
    public static String encryptSha1(String origStr){
        return DigestUtils.sha1Hex(origStr.getBytes());
    }
}
